﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using EditeurSyntaxiqueVocal.Forms;

namespace EditeurSyntaxiqueVocal.Languages.LanguageZ
{
    public partial class Exposé : Form
    {
        private int pos = 1;
        public Exposé()
        {
            InitializeComponent();
            WebBrowserExpose.Url = new Uri( Application.StartupPath + @"\Languages\LanguageZ\kwz\expose\p1.htm");            
        }

        private void ButtonBegin_Click(object sender, EventArgs e)
        {
            pos = 1;
            WebBrowserExpose.Url = new Uri(Application.StartupPath + @"\Languages\LanguageZ\kwz\expose\p1.htm");
            HeaderGroupExposé.ValuesPrimary.Heading = "Exposé   (" + pos + ")";
        }

        private void ButtonEnd_Click(object sender, EventArgs e)
        {
            pos = 21;
            WebBrowserExpose.Url = new Uri(Application.StartupPath + @"\Languages\LanguageZ\kwz\expose\p21.htm");
        }

        private void ButtonProvious_Click(object sender, EventArgs e)
        {
            pos = --pos ==0 ? 21 : pos;
            WebBrowserExpose.Url = new Uri(Application.StartupPath + @"\Languages\LanguageZ\kwz\expose\p" + pos + @".htm");
        }

        private void ButtonNext_Click(object sender, EventArgs e)
        {
            pos = ++pos == 22 ? 1 : pos;
            WebBrowserExpose.Url = new Uri(Application.StartupPath + @"\Languages\LanguageZ\kwz\expose\p" + pos + @".htm");
        }

        private void WebBrowserExpose_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            HeaderGroupExposé.ValuesPrimary.Heading = "Exposé   (" + pos + ")";
        }
    }
}